Optimal. Leaf size=68 \[ \frac {\left (b^2-4 a c\right ) d^3 \left (a+b x+c x^2\right )^{1+p}}{(1+p) (2+p)}+\frac {d^3 (b+2 c x)^2 \left (a+b x+c x^2\right )^{1+p}}{2+p} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {706, 643}
\begin {gather*} \frac {d^3 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^{p+1}}{(p+1) (p+2)}+\frac {d^3 (b+2 c x)^2 \left (a+b x+c x^2\right )^{p+1}}{p+2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 643
Rule 706
Rubi steps
\begin {align*} \int (b d+2 c d x)^3 \left (a+b x+c x^2\right )^p \, dx &=\frac {d^3 (b+2 c x)^2 \left (a+b x+c x^2\right )^{1+p}}{2+p}+\frac {\left (\left (b^2-4 a c\right ) d^2\right ) \int (b d+2 c d x) \left (a+b x+c x^2\right )^p \, dx}{2+p}\\ &=\frac {\left (b^2-4 a c\right ) d^3 \left (a+b x+c x^2\right )^{1+p}}{(1+p) (2+p)}+\frac {d^3 (b+2 c x)^2 \left (a+b x+c x^2\right )^{1+p}}{2+p}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.47, size = 58, normalized size = 0.85 \begin {gather*} \frac {d^3 (a+x (b+c x))^{1+p} \left (b^2 (2+p)+4 b c (1+p) x+4 c \left (-a+c (1+p) x^2\right )\right )}{(1+p) (2+p)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.74, size = 74, normalized size = 1.09
method | result | size |
gosper | \(-\frac {\left (c \,x^{2}+b x +a \right )^{1+p} \left (-4 c^{2} p \,x^{2}-4 b c p x -4 c^{2} x^{2}-b^{2} p -4 b c x +4 a c -2 b^{2}\right ) d^{3}}{p^{2}+3 p +2}\) | \(74\) |
risch | \(-\frac {d^{3} \left (-4 p \,c^{3} x^{4}-8 p b \,c^{2} x^{3}-4 c^{3} x^{4}-4 a \,c^{2} p \,x^{2}-5 b^{2} c p \,x^{2}-8 b \,c^{2} x^{3}-4 a b c p x -b^{3} p x -6 b^{2} c \,x^{2}-a \,b^{2} p -2 b^{3} x +4 a^{2} c -2 a \,b^{2}\right ) \left (c \,x^{2}+b x +a \right )^{p}}{\left (2+p \right ) \left (1+p \right )}\) | \(133\) |
norman | \(\frac {b \,d^{3} \left (4 a c p +b^{2} p +2 b^{2}\right ) x \,{\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{p^{2}+3 p +2}+\frac {c \,d^{3} \left (4 a c p +5 b^{2} p +6 b^{2}\right ) x^{2} {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{p^{2}+3 p +2}-\frac {a \,d^{3} \left (-b^{2} p +4 a c -2 b^{2}\right ) {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{p^{2}+3 p +2}+\frac {4 c^{3} d^{3} x^{4} {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{2+p}+\frac {8 c^{2} b \,d^{3} x^{3} {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{2+p}\) | \(204\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 123, normalized size = 1.81 \begin {gather*} \frac {{\left (4 \, c^{3} d^{3} {\left (p + 1\right )} x^{4} + 8 \, b c^{2} d^{3} {\left (p + 1\right )} x^{3} + a b^{2} d^{3} {\left (p + 2\right )} - 4 \, a^{2} c d^{3} + {\left (b^{2} c d^{3} {\left (5 \, p + 6\right )} + 4 \, a c^{2} d^{3} p\right )} x^{2} + {\left (b^{3} d^{3} {\left (p + 2\right )} + 4 \, a b c d^{3} p\right )} x\right )} {\left (c x^{2} + b x + a\right )}^{p}}{p^{2} + 3 \, p + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 151 vs.
\(2 (68) = 136\).
time = 3.06, size = 151, normalized size = 2.22 \begin {gather*} \frac {{\left (a b^{2} d^{3} p + 4 \, {\left (c^{3} d^{3} p + c^{3} d^{3}\right )} x^{4} + 2 \, {\left (a b^{2} - 2 \, a^{2} c\right )} d^{3} + 8 \, {\left (b c^{2} d^{3} p + b c^{2} d^{3}\right )} x^{3} + {\left (6 \, b^{2} c d^{3} + {\left (5 \, b^{2} c + 4 \, a c^{2}\right )} d^{3} p\right )} x^{2} + {\left (2 \, b^{3} d^{3} + {\left (b^{3} + 4 \, a b c\right )} d^{3} p\right )} x\right )} {\left (c x^{2} + b x + a\right )}^{p}}{p^{2} + 3 \, p + 2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 877 vs.
\(2 (61) = 122\).
time = 115.06, size = 877, normalized size = 12.90 \begin {gather*} \begin {cases} \frac {4 a c d^{3} \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{a + b x + c x^{2}} + \frac {4 a c d^{3} \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{a + b x + c x^{2}} + \frac {4 a c d^{3}}{a + b x + c x^{2}} - \frac {b^{2} d^{3}}{a + b x + c x^{2}} + \frac {4 b c d^{3} x \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{a + b x + c x^{2}} + \frac {4 b c d^{3} x \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{a + b x + c x^{2}} + \frac {4 c^{2} d^{3} x^{2} \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{a + b x + c x^{2}} + \frac {4 c^{2} d^{3} x^{2} \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{a + b x + c x^{2}} & \text {for}\: p = -2 \\- 4 a c d^{3} \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} - 4 a c d^{3} \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} + b^{2} d^{3} \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} + b^{2} d^{3} \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} + 4 b c d^{3} x + 4 c^{2} d^{3} x^{2} & \text {for}\: p = -1 \\- \frac {4 a^{2} c d^{3} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {a b^{2} d^{3} p \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {2 a b^{2} d^{3} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {4 a b c d^{3} p x \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {4 a c^{2} d^{3} p x^{2} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {b^{3} d^{3} p x \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {2 b^{3} d^{3} x \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {5 b^{2} c d^{3} p x^{2} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {6 b^{2} c d^{3} x^{2} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {8 b c^{2} d^{3} p x^{3} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {8 b c^{2} d^{3} x^{3} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {4 c^{3} d^{3} p x^{4} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} + \frac {4 c^{3} d^{3} x^{4} \left (a + b x + c x^{2}\right )^{p}}{p^{2} + 3 p + 2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.70, size = 88, normalized size = 1.29 \begin {gather*} \frac {4 \, {\left (c x^{2} + b x + a\right )}^{2} {\left (c x^{2} + b x + a\right )}^{p} c d^{3}}{p + 2} + \frac {{\left (c x^{2} + b x + a\right )}^{p + 1} b^{2} d^{3}}{p + 1} - \frac {4 \, {\left (c x^{2} + b x + a\right )}^{p + 1} a c d^{3}}{p + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.65, size = 160, normalized size = 2.35 \begin {gather*} {\left (c\,x^2+b\,x+a\right )}^p\,\left (\frac {a\,d^3\,\left (b^2\,p-4\,a\,c+2\,b^2\right )}{p^2+3\,p+2}+\frac {c\,d^3\,x^2\,\left (5\,b^2\,p+6\,b^2+4\,a\,c\,p\right )}{p^2+3\,p+2}+\frac {4\,c^3\,d^3\,x^4\,\left (p+1\right )}{p^2+3\,p+2}+\frac {b\,d^3\,x\,\left (b^2\,p+2\,b^2+4\,a\,c\,p\right )}{p^2+3\,p+2}+\frac {8\,b\,c^2\,d^3\,x^3\,\left (p+1\right )}{p^2+3\,p+2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________